/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package ecouteurs;

import controleur.RunHistogramme;
import ia_multiagent1.Agent;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.util.Vector;
import javax.swing.JTextField;

/**
 *
 * @author Baptiste
 */

public class EcouteurHisto implements MouseListener{
 
    private Vector<Agent> agents;
    private JTextField txt;
    
    public EcouteurHisto(Vector<Agent> agents, JTextField txt) {
        this.agents = agents;
        this.txt = txt;
    }

    public void mouseClicked(MouseEvent e) {
        new Thread(new RunHistogramme(agents, txt)).start();
    }

    public void mousePressed(MouseEvent e) {
      //   throw new UnsupportedOperationException("Not supported yet.");
      
    }

    public void mouseReleased(MouseEvent e) {
     //   throw new UnsupportedOperationException("Not supported yet.");
    }

    public void mouseEntered(MouseEvent e) {
    //    throw new UnsupportedOperationException("Not supported yet.");
    }

    public void mouseExited(MouseEvent e) {
    //    throw new UnsupportedOperationException("Not supported yet.");
    }
    
    public void setAgents(Vector<Agent> mesAgents){
        this.agents = mesAgents;
    }

}
